package DAO;

import javax.persistence.EntityManager;

import Entity.Date;

public class DateDAO {

	private DateDAO() {
	}

	public static void create(Date nuevo, EntityManager em) {
		em.persist(nuevo);
	}

	public static Date read(Date par, EntityManager em) {
		return em.find(par.getClass(), par.getId());
	}

	public static void update(Date old, EntityManager em) {
		em.merge(old);
	}

	public static void delete(Date market, EntityManager em) {
		em.remove(market);
	}

}
